package data;

import java.io.Serializable;

import model.GameStake;
import model.GameType;
import model.GameVariant;

public class Game implements GameInterface, Serializable
{
	private int id;
	
	private int seats;

	private int seatsTaken;
	
	private int smallBlind;
	
	private GameVariant variant;
	
	private GameType type;
	
	private GameStake stake;
	
	private int buyin;
	
	public Game()
	{
		
	}
	
	public Game(model.Game game)
	{
		copy(game);
	}
	
	public void copy(model.Game game)
	{
		setVariant(game.getVariant());
		setType(game.getType());
		setStake(game.getStake());
		setId(game.getId());
		setSmallBlind(game.getSmallBlind());
		setSeats(game.getSeats());
		setSeatsTaken(game.getSeatsTaken());
		setBuyin(game.getBuyin());
	}

	public void setVariant(GameVariant variant)
	{
		this.variant = variant;
	}
	
	public GameVariant getVariant()
	{
		return variant;
	}
	
	public void setType(GameType type)
	{
		this.type = type;
	}
	
	public GameType getType()
	{
		return type;
	}
	
	public void setStake(GameStake stake)
	{
		this.stake = stake;
	}
	
	public GameStake getStake()
	{
		return stake;
	}
	
	public void setId(int id)
	{
		this.id = id;
	}
	
	public int getId()
	{
		return id;
	}
	
	public void setSmallBlind(int smallBlind)
	{
		this.smallBlind = smallBlind;
	}
	
	public int getSmallBlind()
	{
		return smallBlind;
	}
	
	public int getBigBlind()
	{
		return smallBlind * 2;
	}

	public void setSeats(int seats)
	{
		this.seats = seats;
	}
	
	public void setSeatsTaken(int seatsTaken)
	{
		this.seatsTaken = seatsTaken;
	}
	
	public int getSeats()
	{
		return seats;
	}
	
	public int getSeatsTaken()
	{
		return seatsTaken;
	}
	
	public void setBuyin(int buyin)
	{
		this.buyin = buyin;
	}
	
	public int getBuyin()
	{
		return buyin;
	}
	
	public String toString()
	{
		return stake + " " + variant + " - $" + buyin;
	}
}
